﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="admin_Login" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh" xml:lang="zh">
<head>
<title>一汽大众后台管理系统</title>
<style type="text/css"> 
boady,p,dl,dt,dd,form{margin:0; padding:0;}
body{ background-color:#cbccce;}
#adminmain{ margin:5px auto 0 auto; width:883px;height:516px;background-image:url(../admin/images/head_background.jpg);}
#adminmain .aclear{ clear:both; height:1px; overflow:hidden;}
#adminmain .admheader{ height:145px; }
#adminmain .admheader dl dt{ float:left;padding-left:13px;padding-top:10px; font-size:14px; font-weight:600;}
#adminmain .admheader dl dd{ float:right;padding-right:16px;}
#adminmain .admheader dl dd img{ border:none;}
#adminmain .loginbox {float:left;width:883px;height:255px; }
#adminmain .loginbox .mform{float:left;width:883px;height:75px; }
#adminmain .loginbox .lform{float:left;width:883px;height:188px;}
#adminmain .loginbox .lform .nform{color:white;font-size:13px;} 
#adminmain .loginbox .lform .iform{ border:#666666 solid 1px; height:20px;}
#adminmain .loginbox .lform table td{ font-size:12px; font-family:Arial, Helvetica, sans-serif; font-weight:bold;height:30px;}
#adminmain *{ vertical-align:middle;}
</style>

<script  type="text/javascript"> 
if (window.top!=window.self)
{
window.top.location.href='login.aspx';
}
var o;
function subfunc(obj) {	
	
	o = obj;
	if(o.userName.value.length==0){
		return warning('userName','用户名不能为空!');
	}
	
	if(o.password.value.length==0){
		return warning('password','密码不能为空!');
	}	
	if(o.code.value.length==0){
		return warning('code','验证码不能为空!');
	}	
	return true;
	
				
	
}
function warning(FieldName,WarningString){
		alert(WarningString);
		eval("o." + FieldName + ".focus();");
		return false;
}
 function ChangeVCode() {
        var img = document.getElementById("imgcode");
        img.src = "../admin/ashx/ValidateCode.ashx?"+new Date();

    }
</script>
</head>
<body  style ="margin-top:11px; margin-bottom:11px; margin-left:0px; margin-right:0px" onload="ChangeVCode()"> 
<center>
<div id="adminmain">
	<div class="admheader">
		<dl>
			<dt>一汽大众</dt>
			<dd><a ="#"><img alt=""   src="../admin/images/1.gif"/></a></dd>
		</dl>
		<div class="aclear"></div>	
	</div>
 
	<div class="loginbox" >
	    <div class="mform">
	       
	    </div>
		<div class="lform">
			<form runat="server" method="post" id="form1">
				<table width="100%" align="center" >
				   <tr>
				      <td width="280">&nbsp;</td>
				      <td width="30">&nbsp;</td>
				      <td width="70" class="nform">用户名</td>
					  <td width="140" colspan="2">
					    <asp:TextBox ID="userName" runat="server" CssClass="iform" size="18" style="width:140px;"/>
					    
					   </td>
					  <td >&nbsp;</td>
				   </tr>
				   <tr>
				      <td>&nbsp;</td>
				      <td>&nbsp;</td>
				      <td width="70" class="nform">密&nbsp;&nbsp;&nbsp;码</td>
					  <td width="140" colspan="2">
					   <asp:TextBox ID="password" runat="server" TextMode="Password"  size="18" value="" CssClass="iform" style="width:140px;"></asp:TextBox>
					  </td>
				      <td>&nbsp;</td>
				   </tr>
				   <tr>
				      <td>&nbsp;</td>
				      <td>&nbsp;</td>
				      <td width="70" class="nform">验证码</td>
					  <td width="50">
					    <asp:TextBox ID="code" runat="server" CssClass="iform" size="4" maxlength="4" value="" style="width:40px;"/>
					  </td>
				      <td width="50"><img src="../admin/ashx/ValidateCode.ashx" alt="" onclick="ChangeVCode()" id="imgcode" /></td>
				      <td>&nbsp;</td>
				   </tr>
				   <tr>
				      <td colspan="5" align="right" style="padding-right:0px;">
				      <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="images/adm_sumbit.gif" OnClick="btnLogon_Click" width="66" height="23" OnClientClick="return subfunc(document.forms[0]);" />
				      <img src="images/adm_reset.gif" alt="重置" onclick="javascript:document.forms[0].reset();" width="66" height="23" style="margin-left:10px;cursor:pointer"/></td>
			       	  <td>&nbsp;</td>
			       	  
			       </tr>
				</table>

			</form>
           
		</div>	
	</div> 
</div>
</center>
</body>
</html>

